<?php echo $this->Html->script('jquery-1.4.2.min.js'); ?>
<?php echo $this->Html->script('jquery-ui-1.8.4.custom.min.js'); ?>
<?php echo $this->Html->css('start/jquery-ui-1.8.4.custom.css'); ?>

	
<head>

 

<head>
 
  <script>

	function setFilter(){
	document.getElementById("filter").value = 1;
	}
    $(function(){$(
       '#datepicker1').datepicker();
      });
  $(document).ready(function() {
    $("button").button();
  });

  $(document).ready(function() {
    $("#change").popover(options);
  });

  </script>
  
  
  

</head>

<body>


	 <img src='<?php echo $image['Account']['image']; ?>'  height="80" width="80" />&nbsp;<i class="muted"><?php echo  '@'.$image['Account']['screen_name'] ?></a></i>


	 <br></br>

    <table>
        <tr>
            <th >Time</th>
            <th>Text</th>
            <th>Status</th>
            <th>Actions</th>

        </tr>
        <?php foreach($results[1] as $field):?>
            <tr style="background-color:#FFFFFF">
              <th> <button type ="button" rel="popover" class="btn" data-content="change Time ?"><?php echo $field['FutureTweet']['release_date'] ?></button></th>
              <th> <?php echo $field['FutureTweet']['tweet_text'] ?></th>
              <th> <?php echo $field['FutureTweet']['status']; ?></th>
			  
              </th>
			  <th width = 20px><?php if($results[0] == 'moderator' && $field ['FutureTweet']['status'] == 'pending') { ?>
              <button class="btn"><?php echo $this->Html->link('Approve', array('action'=>'approvePost1' , $field['FutureTweet']['id'])); ?></button>
			  <?php } ?></th>

        <th width = 20px><?php 

        $accID1 = $this->Session->read($field['FutureTweet']['account_id']);
        if($results[0] == 'moderator' && $field ['FutureTweet']['status'] == 'pending') { ?>
              <button class="btn"><?php echo $this->Html->link( 'Reject', array('action'=>'rejectPost' , $field['FutureTweet']['id']));; ?></button>
        <?php } ?></th>

            </tr>
       <!-- <td>
            <button type="button" onclick="displayDate()">Edit</button>
            <button type="button"   onclick="displayDate()">Delete</button>
        </td>-->

        
        <?php endforeach;?>
    </table>
    <div class="box" align = "center" >
    <br/>
       <?php
        echo $this->Form->create();
		echo $this->Form->input('filter',array('type'=>'hidden','id'=>'filter'));
        echo $this->Form->input('Filter by date', array('type' => 'text','id' => 'datepicker1'));
        echo $this->Form->button('Filter',array('class'=>'btn','onclick'=>'setFilter()'));
        ?>
    </div>

    
</body>
</html>